package tsing.javase.designpattern.responsebility;

//hr审批实现
public class HrApprovalHandler extends ApprovalHandler {
    @Override
    public void nextHandler(ApprovalHandler approvalHandler) {
        super.nextHandler(approvalHandler);
    }

    @Override
    public void approval(HandleContext context) {
        System.out.println("hr审批");
        if(context.getFlag()){
            invokeNext(context);
        }
    }

    @Override
    protected void invokeNext(HandleContext context) {
        super.invokeNext(context);
    }
}
